package com.bestcem.xm.deliver.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bestcem.xm.component.mybatis.base.BaseEntity2;
import com.bestcem.xm.deliver.config.StringValue2FastJsonSerializer;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @TableName ds_deliver_customlinkdeliver
 */
@TableName(value = "ds_deliver_customlinkdeliver")
@Data
@EqualsAndHashCode(callSuper = true)
public class DeliverCustomLinkDeliver extends BaseEntity2 {
    @TableId(value = "id")
    private String id;

    /**
     * 组织ID
     */
    @TableField(value = "org_id")
    @JsonProperty("org_id")
    @JSONField(name = "org_id")
    private String orgId;

    /**
     * 问卷ID
     */
    @TableField(value = "survey_id")
    @JsonProperty("survey_id")
    @JSONField(name = "survey_id")
    private String surveyId;

    /**
     * 投放ID
     */
    @TableField(value = "deliver_id")
    @JsonProperty("deliver_id")
    @JSONField(name = "deliver_id")
    private String deliverId;

    /**
     * 是否定制
     */
    @TableField(value = "is_custom")
    @JsonProperty("is_custom")
    @JSONField(name = "is_custom")
    private Boolean isCustom;

    /**
     * 获取问卷请求方式
     */
    @TableField(value = "req_method")
    @JsonProperty("req_method")
    @JSONField(name = "req_method")
    private Integer reqMethod;

    /**
     * 通用规则
     */
    @TableField(value = "general_rule")
    @JsonProperty("general_rule")
    @JSONField(name = "general_rule", serializeUsing = StringValue2FastJsonSerializer.class)
    private String generalRule;

    /**
     * 定制规则（function_id）
     */
    @TableField(value = "custom_rule")
    @JsonProperty("custom_rule")
    @JSONField(name = "custom_rule")
    private String customRule;

    /**
     * 问卷时效类型(永久和指定时间)
     */
    @TableField(value = "link_aging_type")
    @JsonProperty("link_aging_type")
    @JSONField(name = "link_aging_type")
    private Integer linkAgingType;

    /**
     * 时效时间{“type”:“0小时1天”，"value":"指定时间"}
     */
    @TableField(value = "link_aging_time")
    @JsonProperty("link_aging_time")
    @JSONField(name = "link_aging_time", serializeUsing = StringValue2FastJsonSerializer.class)
    private String linkAgingTime;

    /**
     * 外部参数唯一性时效类型(永久和指定时间)
     */
    @TableField(value = "param_only_aging_type")
    @JsonProperty("param_only_aging_type")
    @JSONField(name = "param_only_aging_type")
    private Integer paramOnlyAgingType;

    /**
     * 外部参数唯一性时效天数
     */
    @TableField(value = "param_only_aging_days")
    @JsonProperty("param_only_aging_days")
    @JSONField(name = "param_only_aging_days")
    private Integer paramOnlyAgingDays;

    /**
     * 签名配置{“sign_key” : " " }
     */
    @TableField(value = "sign_config")
    @JsonProperty("sign_config")
    @JSONField(name = "sign_config")
    private String signConfig;

    /**
     * 是否开启签名校验
     */
    @TableField(value = "sign_check")
    @JsonProperty("sign_check")
    @JSONField(name = "sign_check")
    private Boolean signCheck;
}